package top.kaoshanji.r3ch11a;

/**
 * @author kaoshanji
 * ^_^
 * create time 2025/5/8 18:43
 */
public class ClientTest extends Thread {

    private SequenceNumber sn;

    public ClientTest(SequenceNumber sn) {
        this.sn = sn;
    }

    @Override
    public void run() {
        // 每个线程打出3个序列值
        for (int i = 0; i < 3; i++) {
            System.out.println("thread[ " + Thread.currentThread().getName() + "] sn [ " + sn.getNextNum() + "]");
        }

    }
}
